import React from 'react'
import {addNum, minuxNum, addNumAsync} from './index.redux'
import {connect} from 'react-redux'

@connect(state=>state,{addNum, minuxNum, addNumAsync})
class App extends React.Component{


    render(){
        console.log(this.props)
        return(
            <div>
                <h1>num:{this.props.num}</h1>
                <button onClick={this.props.addNum}>num加一</button>
                <button onClick={this.props.minuxNum}>num减一</button>
                <button onClick={this.props.addNumAsync}>num两秒后加一</button>
            </div>
        )
    }
}
export default App
